﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=1">
    <meta name="format-detection" content="telephone=no">
    <meta charset="UTF-8">
    <title>flex布局方向</title>

    <style>
        .father{
            border: 1px solid red;
            /*
             * 把父盒子设置成伸缩盒布局
             * 特征:子元素默认水平排列
             */
            display:flex;
            /**
             * flex方向
             * 可取值有默认值    row  column 和该值对应的反转reverse
             */
            flex-direction:column;
        }
        .child{
            border: 1px solid blue;
            height: 100px; width: 100px;
        }
    </style>
</head>
<body>
    <h1>flex布局方向</h1>
    <div class="father">
        <div class="child">child1</div>
        <div class="child">child2</div>
        <div class="child">child3</div>
        <span>行内元素也可以影响到1</span>
        <span>行内元素也可以影响到2</span>
    </div>
</body>
</html>